The present invention relates to a data transfer device such as a switching hub, etc. for transferring data across a network such as Ethernet, etc.
A frame transfer method in the Ethernet (registered trademark) can be roughly classified into two methods. One method is a store-and-forward method, and the other is a cut-through method.
In the case of the store-and-forward method, the data transfer device temporarily stores a memory with all of received frames and transmit the frame to a next device.
On the other hand, in the case of the cut-through method, the data transfer device executes a process of determining a device to which the frame should be transferred (forwarded) next at a point of time when receiving MAC DA (Media Access Control Destination Address) contained in the frame, and starts transferring the frame if transferable at a point of time when determining the transfer target device (refer to Patent document 1, paragraphs 0002-0006).
In comparison between these two methods, generally the cut-through method has a shorter period of time required for transferring the frame within the device, i.e., a smaller process delay and is therefore superior.
In the conventional cut-through method, however, there arises a problem, wherein if an error occurs in the frame, as will be explained later on, the error frame wastes bands of communication paths, and so on. Therefore, the store-and-forward method was adopted in some cases at the cost of the processing delay.
For instance, the Ethernet has a mechanism capable of judging from 4-byte FCS (Frame Check Sequence) attached to a tail of the frame whether the received frame is broken or not.
Therefore, when transmitting the frame, an FCS calculation is performed while transmitting the data, and the frame is sent in a way that attaches the FCS to the tail of the frame. When receiving the frame, the FCS calculation is performed while receiving the frame, and, at a point of time when receiving the whole frame, it is judged whether the data is broken or not by making a comparison with the FCS transmitted while being attached to the frame.
If a line quality on the network declines, the error occurs in the frame. In the cut-through method, each of the devices can detect the error, however, the frame transmission to a rear-stage device has already started just when detecting the error, and hence it follows that this error frame wastes the bands on the network. Moreover, a host serving as a frame destination executes a discard process of discarding the error frame, so that a throughput of the destination host is waste.
On the other hand, in the store-and-forward method, the frame is transmitted after temporarily storing the memory with the frame. Hence, the error-detected frame can be discarded by the device that detected the error. With this mechanism, futile traffic does not occur on the network, and a load of the frame discard process is not applied onto the destination host.
Such being the case, there is proposed a device including a mechanism for switching over to the cut-through method when an error occurrence frequency is small and to the store-and-forward method just when the number of errors exceeds a certain threshold value (it is judged that the line quality declines).
(Patent Document 1)
Japanese Patent Application Laid-Open Publication No. 2002-24723